<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="UTF-8">
    <title>新股道</title>
    <link rel="stylesheet" href="__PUBLIC__/weChat/css/base.css">
    <style>
        *{margin: 0;padding: 0;}
        .pay_line{height: 52px;line-height: 52px;font-size: 17px;padding: 0 10px;background: #fff;}
        .pay_line1{font-size: 16px;height: 46px;line-height: 46px;background: #f8f8f8;}
        .pay_line2{font-size: 18px;height: 70px;line-height: 70px;padding-left: 70px;background: #fff url("__PUBLIC__/weChat/images/icon_zfb@2x.png") no-repeat 5px center;background-size: 50px;position: relative;}
        .pay_wei{background: #fff url("__PUBLIC__/weChat/images/icon_wx@2x.png") no-repeat 5px center;background-size: 50px;border-bottom: 1px solid #e3e3e3;border-top: 1px solid #e3e3e3;}
        .pay_yin{background: #fff url("__PUBLIC__/weChat/images/icon_yl@2x.png") no-repeat 5px center;background-size: 50px;}
        .pay_point{width: 20px;height: 20px;border: 1px solid #e3e3e3;position: absolute;right: 15px;top: 25px;display: block;border-radius: 50%;}
        .pay_check{background: url("__PUBLIC__/weChat/images/icon_xz@2x.png") no-repeat;background-size: 20px;}
        .pay_btn{width: 100%;background: #c62928;color:#fff;height: 45px;line-height: 45px;border-radius: 5px;border: none;outline: none;}
        .pay_right{text-align: right;font-size: 15px;}
        .pay_right>span{font-size: 24px;color: #d92e20;font-weight: bold;}
        .pay_box{padding: 0 10px;background: #ffffff;}
        body{height: 100vh;position: relative;background: #f8f8f8;}
        .pay_line_btn{position: absolute;bottom:10px;width: 100%;box-sizing: border-box;}
    </style>
</head>
<body>
<img style="width: 100%;" src="__PUBLIC__/weChat/images/banner2@2x.png" />
<div class="pay_line font1">
    <div class="fl">需支付</div>
    <div class="pay_right"><span>6000元</span>/月</div>
</div>
<div class="pay_line pay_line1 font1">支付方式</div>

<form name="form2" id="form2" action="<?= $param['serverUrl'] ?>" method="post">
    <input type="hidden" name="inputCharset" id="inputCharset" value="<?= $param['inputCharset'] ?>" />
    <input type="hidden" name="pickupUrl" id="pickupUrl" value="<?=$param['pickupUrl']?>"/>
    <input type="hidden" name="receiveUrl" id="receiveUrl" value="<?=$param['receiveUrl']?>" />
    <input type="hidden" name="version" id="version" value="<?=$param['version']?>"/>
    <input type="hidden" name="language" id="language" value="<?=$param['language']?>" />
    <input type="hidden" name="signType" id="signType" value="<?=$param['signType']?>"/>
    <input type="hidden" name="merchantId" id="merchantId" value="<?=$param['merchantId']?>" />
    <input type="hidden" name="payerName" id="payerName" value="<?=$param['payerName']?>"/>
    <input type="hidden" name="payerEmail" id="payerEmail" value="<?=$param['payerEmail']?>" />
    <input type="hidden" name="payerTelephone" id="payerTelephone" value="<?=$param['payerTelephone'] ?>" />
    <input type="hidden" name="orderNo" id="orderNo" value="<?=$param['orderNo']?>" />
    <input type="hidden" name="orderAmount" id="orderAmount" value="<?=$param['orderAmount'] ?>"/>
    <input type="hidden" name="orderCurrency" id="orderCurrency" value="<?=$param['orderCurrency']?>" />
    <input type="hidden" name="orderDatetime" id="orderDatetime" value="<?=$param['orderDatetime']?>" />
    <input type="hidden" name="orderExpireDatetime" id="orderExpireDatetime" value="<?=$param['orderExpireDatetime'] ?>"/>
    <input type="hidden" name="productName" id="productName" value="<?=$param['productName']?>" />
    <input type="hidden" name="productPrice" id="productPrice" value="<?=$param['productPrice']?>" />
    <input type="hidden" name="productNum" id="productNum" value="<?=$param['productNum']?>"/>
    <input type="hidden" name="productId" id="productId" value="<?=$param['productId']?>" />
    <input type="hidden" name="productDesc" id="productDesc" value="<?=$param['productDesc']?>" />
    <input type="hidden" name="ext1" id="ext1" value="<?=$param['ext1']?>" />
    <input type="hidden" name="ext2" id="ext2" value="<?=$param['ext2']?>" />
    <input type="hidden" name="extTL" id="extTL" value="<?=$param['extTL']?>" />
    <input type="hidden" name="payType" id="payType" value="<?=$param['payType']?>" />
    <input type="hidden" name="issuerId" value="<?=$param['issuerId']?>" />
    <input type="hidden" name="payerAcctNo" value="<?=$param['payerAcctNo']?>" />
    <input type="hidden" name="termId" value="<?=$param['termId']?>" />
    <input type="hidden" name="signMsg" id="signMsg" value="<?= $signMsg ?>" />
</form>

<div class="pay_box">
    <!--<div class="pay_line2 font1">支付宝<span data-pay-type = "45" class="pay_point"></span></div>
    <div class="pay_line2 pay_wei">微信<span data-pay-type = "36" class="pay_point"></span></div>-->
    <div class="pay_line2 pay_yin">银联<span data-pay-type = "99"  class="pay_point pay_check"></span></div>
</div>

<div class="pay_line pay_line_btn"><button class="pay_btn">确认支付</button></div>

<script src="__PUBLIC__/weChat/js/jquery-2.2.2.js"></script>
<script>
    $(function () {
        $(".pay_point").click(function () {
            var data_pay_type = $(this).attr('data-pay-type');
            $("#payType").val(data_pay_type)
            $.ajax({
                type:'post',
                url:"<?php echo url('Pay/signMsg')?>",
                data:{'pay_type':data_pay_type,'pay_money':300000},
                success:function(msg){
                    if(msg.code == 0){
                        $("#signMsg").val(msg.data);
                    }else{
                        alert('生成签名失败');
                    }
                }
            });
            if($(this).hasClass("pay_check")){
                return false;
            }
            $(".pay_check").removeClass("pay_check");
            $(this).addClass("pay_check");
        });
    })
    $(".pay_btn").click(function(){
        $("#form2").submit();
    });

</script>
</body>
</html>